package com.lfk.three.con;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.lfk.three.item.Act_Item;
import com.lfk.three.item.Ad_Item;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by liufengkai on 16/4/9.
 */
public class JsonHandler {
    /**
     * json 解析getActList
     *
     * @param response
     */
    public static ArrayList<Act_Item> handleActList(String response) {
        Gson gson = new Gson();
        return gson.fromJson(response, new TypeToken<List<Act_Item>>() {
        }.getType());
    }

    public static ArrayList<Ad_Item> handleAdList(String response) {
        Gson gson = new Gson();
        return gson.fromJson(response, new TypeToken<List<Ad_Item>>() {
        }.getType());
    }


}
